import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取本地维修历史table
export const getmaintainhistoryList = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/maintainHistory/${params.vin}`, {
    params
  });

// 获取本地维修项目table
export const getmaintainProjectList = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/maintainProject/${params.vin}`, {
    params
  });

// 获取本地维修备件table
export const getmaintainPartList = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/history/maintainPart/${params.vin}`, {
    params
  });

// 获取OEM
// export const getoemList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/oemHistory/${params.vin}`, { params });

// export const getoemList = params =>
//   axios.get(`${SERVER.DMS_INTERFACEMANAGE}/dynamic/getOemVehicleHistory/${params.vin}`, {
//     params
//   });
// 获取OEM
export const getoemList = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerCare/vhclRepairHistory/getVhclRepairHistory`, {
    params,
    timeout: 60000
  });
// 获取三包历史
export const getSbList = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerCare/vhclRepairHistory/getRuleRepairHistory`, {
    params
  });
// // 获取维修项目列表
// export const getmaintainProjectTable = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/maintainProject/${params.RO_NO}`, { params });

// // 获取维修材料列表
// export const getmaintainMaterialTable = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/business/queryRepairPart/${params.RO_NO}`, { params });

// // 获取销售材料列表
// export const getSellMaterialTable = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/business/SellMaterial/${params.RO_NO}`, { params });

// // 获取附加项目列表
// export const getAccessoryTable = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/business/addItem/${params.RO_NO}`, { params });
// 查询维修项目(选项卡)
export const getWXXM = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repair/queryRoLabourByRoNO/${params.RO_NO}`, {
    params
  });

// 查询维修材料(选项卡)
export const getWXCL = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repair/histroy/queryRoRepairPartByRoNO/${params.RO_NO}`, {
    params
  });

// 查询销售材料(选项卡)
export const getXSCL = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repair/querySalesPartByRoNO/${params.RO_NO}`, {
    params
  });

// 查询附加项目(选项卡)
export const getFJXM = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repair/queryAddItem/${params.RO_NO}`, {
    params
  });

// 获取工单详情
export const getaccountdetail = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/business/account/${params.RO_NO}`, {
    params
  });
// 获取结算单详情
export const getqueryPrintInfo = params =>
  axios.get(`dmscloud.repair/repair/business/queryBalanceInfo/${params.RO_NO}`, {
    params
  });
// 获取OEM结算维修项目列表
export const getoemQueryComplaint = params =>
  axios.get(`/dms.web/customer/rest/customer/queryComplaint/maintainProjectOEM/${params.RO_NO}/${params.ASC_SHORTNAME}`, {
    params
  });

// 获取OEM结算维修材料列表
export const getoemmaintainMaterialOEM = params =>
  axios.get(`/dms.web/customer/rest/customer/queryComplaint/maintainMaterialOEM/${params.RO_NO}/`, {
    params
  });

// 获取OEM结算销售材料列表
export const getoemSellMaterialOEM = params =>
  axios.get(`/dms.web/customer/rest/customer/queryComplaint/SellMaterialOEM/${params.RO_NO}/`, {
    params
  });

// 获取OEM结算附加项目列表
export const getoemAccessoryOEM = params =>
  axios.get(`/dms.web/customer/rest/customer/queryComplaint/AccessoryOEM/${params.RO_NO}/`, {
    params
  });

// 获取OEM结算工单信息详情
export const getoemaccountOEMdetail = params =>
  axios.get(`/dms.web/customer/rest/customer/protectRepair/accountOEM/${params.RO_NO}/${params.DEALER_CODE}`, {
    params
  });

// 获取维修项目列表详情
export const getTabledetail = params =>
  axios.get(`/dms.web/customer/rest/customer/solicitude/maintainHistory/maintainHistoryProject/${params.RO_NO}/assign`, {
    params
  });

// 获取维修类型数据字典
export const getfindAllRepairType = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedataRepairtypes/findAllRepairType`, {
    params
  });

// 获取保养类型数据字典
export const getlendStuffQueryType = params =>
  axios.get(`/dms.web/part/rest/basedata/lendStuff/queryType`, {
    params
  });
